package com.joywifi.android.demo.utils;

import android.support.design.widget.Snackbar;
import android.view.View;

public class UiUtils {

    private UiUtils() {
    }

    public static void snackbar(View view, String msg) {
        final Snackbar snackbar = Snackbar.make(view, msg, Snackbar.LENGTH_LONG);
        snackbar.show();
        snackbar.setAction("取消", new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                snackbar.dismiss();
            }
        });
    }
}
